<%@ page import="java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Purchase Summary</title>
<style type="text/css">
<!--
.style3 {
	font-family: Arial;
	font-size: 12px;
}
-->
</style>
</head>
<body>
	  <table width="100%" height = "30"  border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFBF0">
<%
int dLoop=0;
ResultSet Rs = task.fetchFuturesList();
Rs.beforeFirst();
int n=1;
int i=0;
while (Rs.next())
{
i = Rs.getInt("id");
float cllot = 0;

	cllot = Rs.getFloat("cllot");
	if ((Rs.getFloat("lots")-cllot) > 0)
	{
%>
        <tr id=<%=Rs.getString("bot_sold") + "-" + Rs.getInt("id")%> onDblClick="cardViewClick(this);" onClick="highlightOn(this);">
          <td width="6%" align="center"><span class="style3"><label id = "inv_id_<%=n%>"><%=Rs.getInt("id")%></label></span></td>
          <td width="17%" align="center"><span class="style3"><%=Rs.getString("ref_number")%></span></td>
          <td width="12%" align="center"><span class="style3"><%=Utils.dateToStr(Rs.getDate("transaction_date"))%></span></td>
          <td width="18%" align="right"><span class="style3"><label id = "lot_id_<%=n%>"><%=Utils.numberToStr(Rs.getFloat("lots"),0)%></label></span></td>
          <td width="13%" align="center"><span class="style3"><%=Rs.getString("bot_sold")%>
            <input type="hidden" id="type_id_<%=n%>" name="type_id_<%=n%>" value ="<%=Rs.getString("bot_sold")%>">
          </span></td>
   		  <% 
		  	String Ter_dt = Utils.dateToStr(Rs.getDate("terminal_month"));
			if (Ter_dt.compareTo("")==0)
			{
				Ter_dt = "";
			}
			else
			{
				Ter_dt = Utils.dateToStr(Rs.getDate("terminal_month")).substring(3);
			}
		  %>
          <td width="13%" align="center"><span class="style3"><%=Ter_dt%></span></td>
          <td width="14%" align="center"><span class="style3"><%=Utils.numberToStr(Rs.getFloat("price"),2)%></span></td>
          <td width="7%" align="right"><input type="checkbox" id = "cb_<%=n%>" name="cb_<%=n%>" onClick="doOptCheck('cb_ + <%=i%>')"></td>
		  
        </tr>
<%
		n=n+1;
	}
		dLoop=dLoop+1;
}
%>
</table>
</body>
</html>
